<template>
  <!-- 根路由 -->
  <router-view />
</template>

<script>

export default {
  name: 'App',
  setup() {

    // 解决el-table报错: ResizeObserver loop completed with undelivered notifications.
    const debounce = (fn, delay) => {
      let timer
      return (...args) => {
        if (timer) {
          clearTimeout(timer)
        }
        timer = setTimeout(() => {
          fn(...args)
        }, delay)
      }
    }
    
    const _ResizeObserver = window.ResizeObserver
    window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
      constructor(callback) {
        callback = debounce(callback, 100);
        super(callback);
      }
    }
  }
}
</script>

<style>
/* 全局配置 */
html,body,#app{ 
  height: 100%;
}
</style>
